Page({
  data: {
    entries: []  // 用来存储从接口返回的数据
  },

  onLoad: function() {
    this.fetchData();
  },

  fetchData: function() {
    wx.request({
      url: 'https://jingqu.kuxia.top/app/Introcom/index',
      method: 'POST',
      data: {
        intri_id: 2
      },
      success: (response) => {
        if (response.data.code === 1) {
          this.setData({
            entries: response.data.data  // 将接口返回的数据存入 entries
          });
        } else {
          wx.showToast({
            title: response.data.msg,
            icon: 'none'
          });
        }
      },
      fail: (err) => {
        console.error('请求失败:', err);
      }
    });
  }
});
